pp108 : Type Library changes for Multi-browser Support

Type Library changes for Multi-browser Support

This topic describes the changes required in the Web libraries used in an application to ensure multi-browser support.

To ensure multi-browser support for HTML content, ensure that

  • the <eibus> tag is replaced with <div> tag.
  • the <div> tag is placed in the BODY (<body> tag) of the HTML content.
  • the <div> tag contains the cordysType attribute that refers to the fully-qualified name of the type library.

As an example consider the following sample codes.

Old Usage: Standards non-compliant sample code in Quirks Mode <head> <eibus:dataisland id="busDataIsland1" automatic="true"/> </head> <body> </body>
New Usage: Standards compliant sample code in Transitional Mode <head> </head> <body> <div id="busDataIsland1" cordysType="wcp.library.data.BusDataIsland" automatic="true"/> </body>

Additionally, to ensure standards compliance,

  • all Web Libraries must be converted to Type Libraries. For details, see Migrating Libraries to Type Libraries.
  • you must use the fully qualified name to refer to each AJAX Toolkit type library. To view the fully qualified names, see Fully Qualified Names of Type Libraries.
  • libraries must now be identified in the following manner. Earlier, thegetElementsByTagName()method was used to identify libraries by their tag names.
    Old Usage: Standards non-compliant sample code in Quirks Mode var splitters = document.getElementsByTagName("splitter"); for (var I = 0; I < splitters.length; I++) { var splitter = splitters[i]; }
    New Usage: Standards compliant sample code in Transitional Mode var splitters = document.getElementsByTagName("div"); for (var I = 0; I < splitters.length; I++) { var splitter = application.hasType(splitters[i], "wcp.library.ui.Splitter") ? splitters[i]: null; }
  • prototypes declared on a Type Library must be standards compliant as shown below.
    Old Usage: Standards non-compliant sample code in Quirks Mode function SampleObject { } function SampleObject.prototype.TestMethod(parameter) { }
    New Usage: Standards compliant sample code in Transitional Mode function SampleObject { } SampleObject.prototype.TestMethod = function(parameter) { }